public class Dog extends Animal implements IRuning,ISwiming{
    public Dog(String name, int age) {
        super(name, age);

    }

    public Dog() {
        super();
    }

    @Override
    public void eat() {
        System.out.println(name+ "吃狗粮");

    }

    @Override
    public void run() {
        System.out.println(name + "正在用狗腿跑！");

    }

    @Override
    public void swim() {
        System.out.println(name +"正在用狗腿游泳！");

    }
    public void nianling() {
        System.out.println(age +"这个年龄了！");
    }

    public static void main(String[] args) {
        Dog dog1 = new Dog();
        dog1.name = "小黄";
        dog1.age = Integer.parseInt("12");
        dog1.eat();
        dog1.run();
        dog1.nianling();
    }
}
